package conexao;  
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
 
public class Conexao {
 
    private String driver = "org.gjt.mm.mysql.Driver";
    private String URL = "jdbc:mysql://localhost/ufmsagencia";
    private String USER = "root";
    private String SENHA = "";
    private Connection conn;
 
    public Conexao() {
        try {
            Class.forName(driver);
            conn = (Connection) DriverManager.getConnection(URL, USER, SENHA);
        } catch (Exception e) {
        }
    }
 
    public Connection getConn() {
        return conn;
    }
 
    public void fecharConexao() {
        try {
            conn.close();
        } catch (SQLException e) {
        }
    }
}